<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="layout" lang="en">
<body>

<div layout:fragment="container" class="container">

    <div class="row">
        <div class="col-xs-12 col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3">
                <h2>You are logged in as</h2>
                <hr class="colorgraph" />
                <div class="row" th:with="currentUser=${#httpServletRequest.userPrincipal?.principal}">
                    <div class="col-xs-6 col-sm-6 col-md-6">
                        <div class="form-group" th:text="${currentUser?.firstName} + ' ' + ${currentUser?.lastName}">
                            FirstName LastName
                        </div>
                    </div>
                 </div>
                <hr class="colorgraph" />
                <div class="row">
                    <div class="col-xs-6 col-md-6">
                        <form th:action="@{/logout}" method="post">
                            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
                            <button class="btn btn-success" type="submit">Sign out</button>
                        </form>
                    </div>
                </div>
        </div>
    </div>
</div>

</body>
</html>